using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net;
using System.Text;
using MimeCloud.Foundations.Helpers;
namespace MimeCloud.GDI.Imaging
{
    public class Net
    {
        public static Image ImageObjectFromUrl(string Url)
        {
            using (System.Net.WebClient wc = new System.Net.WebClient())
            {
                wc.Proxy = WebHelper.GetDefaultProxy();
                try
                {
                    using (Stream sm = wc.OpenRead(Url))
                    {
                        return System.Drawing.Image.FromStream(sm);
                    };
                }
                catch (WebException ex)
                {
                }

                return null;
            };
        }
    }
}
